package com.nsgf.library.ui.page;

import androidx.lifecycle.ViewModel;

import com.kunminx.architecture.ui.state.State;
import com.nsgf.library.data.api.APIs;
import com.nsgf.library.data.bean.ChartDataBean;
import com.nsgf.library.data.bean.ClockInBean;
import com.nsgf.library.data.bean.DisplacementBean;
import com.nsgf.library.data.bean.FacilityBean;
import com.nsgf.library.data.bean.LibraryInfo;
import com.nsgf.library.data.bean.MonitorBean;
import com.nsgf.library.data.bean.ProjectBean;
import com.nsgf.library.data.bean.TransfusionBean;
import com.nsgf.library.data.bean.UserInfo;
import com.nsgf.library.data.bean.WareHouseBean;
import com.nsgf.library.data.bean.WaterRecordsBean;
import com.nsgf.library.data.bean.WorkOrderDetailBean;
import com.nsgf.library.utils.Kits;
import com.nsgf.library.utils.SysUtil;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

/**
 * Create by GC at 2024/9/11
 */
public class StateHolder extends ViewModel {

    public final State<String> name = new State<>(UserInfo.getInstance().getName());
    public final State<String> titleBar = new State<>("");
    public final State<String> phone = new State<>("");
    public final State<String> position = new State<>("");
    public final State<String> time = new State<>(UserInfo.getInstance().getName());
    public final State<String> version = new State<>(SysUtil.getAppVersion());
    public final State<String> projectName = new State<>(UserInfo.getInstance().getProjectName());
    public final State<String> appLog = new State<>(UserInfo.getInstance().getAppLog());


    public final State<String> deviceCode = new State<>("");
    public final State<String> channelId = new State<>("");
    public final State<String> callingMode = new State<>("");
    public final State<String> searchContent = new State<>("");

    public final State<List<LibraryInfo>> testList = new State<>(null);

    public final State<String> H5 = new State<>(APIs.H5);
    public final State<String> H5_MONITORING_REGIN = new State<>(APIs.H5_MONITORING_REGIN);

    public final State<WorkOrderDetailBean.DataBean> workOrderDetailBean = new State<>(null);


    public final State<String> startDate = new State<>("2024-10-09");
    public final State<String> endDate = new State<>("2025-10-09");
    public final State<String> startDateSrc = new State<>("");
    public final State<String> endDateSrc = new State<>("");
    public final State<List<LibraryInfo>> patrolFeed = new State<>(new ArrayList<>());
    public final State<List<LibraryInfo.ReservoirBean>> patrolRiver = new State<>(new ArrayList<>());
    public final State<List<LibraryInfo.ReservoirBean>> patrolReservoir = new State<>(new ArrayList<>());
    public final State<WaterRecordsBean.RealTimeWaterLevelBean> realTimeWaterLevelBeanState = new State<>(new WaterRecordsBean.RealTimeWaterLevelBean());

    public final State<ClockInBean.DataBean.LateAndEarlyListBean> projectInfo = new State<>(new ClockInBean.DataBean.LateAndEarlyListBean());
    /**
     * 水情监测 信息
     */
    public final State<String> maxHisWaterLevel = new State<>("");
    public final State<String> maxHisWaterTime = new State<>("");
    public final State<String> minHisWaterLevel = new State<>("");
    public final State<String> minHisWaterTime = new State<>("");
    public final State<String> maxHisWaterLevelYear = new State<>("");
    public final State<String> maxHisWaterTimeYear = new State<>("");
    public final State<String> minHisWaterLevelYear = new State<>("");
    public final State<String> minHisWaterTimeYear = new State<>("");
    public final State<String> maxHisWaterLevelDay = new State<>("");
    public final State<String> maxHisWaterTimeDay = new State<>("");
    public final State<String> minHisWaterLevelDay = new State<>("");
    public final State<String> minHisWaterTimeDay = new State<>("");


    /**
     * 水库详情实体对象
     */

    public final State<ProjectBean> projectBeanState = new State<>(new ProjectBean());

    public final State<WaterRecordsBean> waterRecordsDetails = new State<>(new WaterRecordsBean());
    public final State<LibraryInfo> waterRecordsInfoDetails = new State<>(null);


    /**
     * 当前用户所有水库列表
     */
    public final State<List<UserInfo.ProjectListBean>> projectList = new State<>(new ArrayList<>());

    /**
     * 防汛仓库
     */
    public final State<WareHouseBean> wareHouseBeanState = new State<>(new WareHouseBean());

    public final State<String> yearMonthWeek = new State<>("");

    public final State<List<ChartDataBean>> chartDataBean = new State<>(new ArrayList<>());
    public final State<TransfusionBean> transfusionBeanState = new State<>(new TransfusionBean());

    public final State<List<String>> transectNames = new State<>(new ArrayList<>());
    public final State<LibraryInfo> registerInfo = new State<>(null);


    /**
     * 位移监测开始
     */
    public final State<ArrayList<ChartDataBean>> chartNEDataBean = new State<>(new ArrayList<>());//图例数据
    public final State<ArrayList<DisplacementBean>> chartNEDisplacementBean = new State<>(new ArrayList<>());
    public final State<String> sectionName = new State<>("");
    public final State<String> testNum = new State<>("");
    public final State<List<MonitorBean.TestNumBean>> tests = new State<>(new ArrayList<>());//位移测次

    public final State<String> startTime = new State<>("");
    public final State<String> NEStartTime = new State<>("");
    public final State<String> NEEndTime = new State<>(Kits.Date.getYmd(Calendar.getInstance().getTimeInMillis()));
    /**
     * 结束
     */
    public final State<FacilityBean> facility = new State<>(new FacilityBean());




}
